﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 依然注入
{
    public interface ID服务注册
    {
        public string Name { get; set; }
        public void SayHai();
    }
    public class TestServiceImpl : ID服务注册
    {
        public string Name { get; set; }

        public void SayHai()
        {
            Console.WriteLine($"Hi,my name is {Name}");
        }
    }
    public class TestServiceImpl2 : ID服务注册
    {
        public string Name { get; set; }

        public void SayHai()
        {
            Console.WriteLine($"你好，我是{Name}");
        }
    }
}
